<%#
# Copyright 2009 Michal Trzcinka
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
# http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
# 
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <title>vCards</title>

  <!-- Individual YUI CSS files -->
  <link rel="stylesheet" type="text/css" href="/yui/reset-fonts-grids/reset-fonts-grids.css">
  <link rel="stylesheet" type="text/css" href="/yui/container/assets/skins/sam/container.css">
  <link rel="stylesheet" type="text/css" href="/yui/menu/assets/skins/sam/menu.css">
  <link rel="stylesheet" type="text/css" href="/yui/button/assets/skins/sam/button.css">
  <link rel="stylesheet" type="text/css" href="/yui/editor/assets/skins/sam/editor.css">
  <link rel="stylesheet" type="text/css" href="/yui/logger/assets/skins/sam/logger.css">
  <%= stylesheet_link_tag 'style' %>

  <!-- Individual YUI JS files -->
  <script type="text/javascript" src="/yui/yahoo/yahoo.js"></script>
  <script type="text/javascript" src="/yui/event/event.js"></script>
  <script type="text/javascript" src="/yui/connection/connection.js"></script>
  <script type="text/javascript" src="/yui/dom/dom.js"></script>
  <script type="text/javascript" src="/yui/dragdrop/dragdrop.js"></script>
  <script type="text/javascript" src="/yui/animation/animation.js"></script>
  <script type="text/javascript" src="/yui/container/container.js"></script>
  <script type="text/javascript" src="/yui/element/element.js"></script>
  <script type="text/javascript" src="/yui/menu/menu.js"></script>
  <script type="text/javascript" src="/yui/button/button.js"></script>
  <script type="text/javascript" src="/yui/editor/editor.js"></script>
  <script type="text/javascript" src="/yui/json/json.js"></script>
  <script type="text/javascript" src="/yui/logger/logger.js"></script>

  <%= javascript_include_tag 'prototype' %>
  <%= javascript_include_tag 'application' %>
  <%= javascript_include_tag 'vcard/utils' %>
  <%= javascript_include_tag 'vcard/prototypes' %>
  <%= javascript_include_tag 'vcard/constants' %>
  <%= javascript_include_tag 'vcard/config' %>
  <%= javascript_include_tag 'vcard/model' %>
  <%= javascript_include_tag 'vcard/view' %>
  <%= javascript_include_tag 'vcard/vcard' %>


  <script type="text/javascript">

    YAHOO.util.Event.throwErrors = true;

        YAHOO.util.Event.on(window, "load", loggerInit);

        function loggerInit() {
            YAHOO.widget.Logger.enableBrowserConsole();
            }

        /*
                    Initialize and render the Menu when its elements are ready
                    to be scripted.
        */

        YAHOO.util.Event.onContentReady("menu", function () {

            /*
                          Instantiate a Menu:  The first argument passed to the
                          constructor is the id of the element in the page
                          representing the Menu; the second is an object literal
                          of configuration properties.
            */

            var oMenu = new YAHOO.widget.Menu(
                "menu",
                {
                    position: "static",
                    hidedelay: 750,
                    lazyload: true,
                    effect: {
                        effect: YAHOO.widget.ContainerEffect.FADE,
                        duration: 0.25
                        }
                    }
                );

            /*
                          Call the "render" method with no arguments since the
                          markup for this Menu instance is already exists in the page.
            */

            oMenu.render();

            });
  </script>

</head>
<body class="yui-skin-sam">

<div id="doc2" class="yui-t7">
  <div id="hd">
    <%= link_to 'Create a new grid', new_grid_path %>
    | <%= link_to 'Grids list', grids_path %>
  </div>

  <div id="bd">
    <div class="yui-g">
      <%= yield %>
    </div>
  </div>

  <div id="ft"><p>Footer</p></div>
</div>


</body>
</html>